package com.jzsk.variable.center.zhengxin.controller;

import com.jzsk.variable.center.domain.dto.menu.LoadMenuReqDTO;
import com.jzsk.variable.center.domain.dto.menu.LoadMenuRespDTO;
import com.jzsk.variable.center.domain.vo.ResponseVO;
import com.jzsk.variable.center.service.menu.MenuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author jiangli
 */
@RestController
@RequestMapping("/menu")
@Api(tags = "菜单操作")
public class MenuController {

    @Resource
    MenuService menuService;

    @PostMapping("/loadMenus")
    @ApiOperation(value = "加载菜单数据", notes = "加载菜单数据")
    public ResponseVO<LoadMenuRespDTO> loadMenus(@RequestBody LoadMenuReqDTO loadMenuReqDTO) {
        return menuService.loadMenus(loadMenuReqDTO);
    }

}
